package com.mairuide.robot.participles;

import java.util.Date;
import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.mairuide._frame.base.BaseRepository;

@Repository
public interface MParticiplesRepository extends BaseRepository<MParticiples> {
	
	/**
	 * 根据时间查询未加入分词库分词信息
	 * @param time
	 * @return
	 */
	@Query(value="select t.* from TB_M_PARTICIPLES t where t.CREATE_TIME > ?1",nativeQuery=true)
	public List<MParticiples> getParticiples4CreateTime(Date createTime);
	
	/**
	 * 问题id查询分词
	 * @param qpId
	 * @return
	 */
	public List<MParticiples> findByQpId(Integer qpId);
	
	/**
	 * 根据父表id删除分词
	 * @param qpId
	 */
	public void deleteByQpId(Integer qpId);
}
